package com.example.mobile2030606174mzq0420;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;

public class MainActivity extends AppCompatActivity {
   private int[] PartIds = {R.drawable.ui_body01,R.drawable.ui_dipan01,R.drawable.ui_door01,
            R.drawable.ui_fadongji01,R.drawable.ui_fangxiangpan01,R.drawable.ui_houboli01,R.drawable.ui_luntai01,
            R.drawable.ui_qianboli01,R.drawable.ui_qiangai01,R.drawable.ui_xuangua01,R.drawable.ui_zhuoyi01,};
    private String[] Partname = {"车身","底盘","车门","发动机","方向盘","后玻璃","轮胎","前玻璃","前盖","悬挂","座椅"};


    private RecyclerView Rv_main;




    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        InOck();
        Rv_main.setLayoutManager(new LinearLayoutManager(this));
        Prat_main.PartRVAdapter adapter = new Prat_main.PartRVAdapter(PartIds,Partname);
        Rv_main.setAdapter(adapter);



    }

private void InOck(){
     Rv_main = (RecyclerView) findViewById(R.id.Rv_main);
}



}